// 二级列表
class Lj {
    constructor() {

    }
    init() {
        let links = document.querySelectorAll('.banner .menu li');
        let imgs = document.querySelectorAll('.banner .cartlist>div');
        for (let i = 0; i < links.length; i++) {
            links[i].onmouseover = function() {


                imgs[i].className = 'item';
            }
            links[i].onmouseleave = function() {
                for (let i = 0; i < links.length; i++) {

                    imgs[i].className = '';
                }
            }
            imgs[i].onmouseover = function() {

                imgs[i].className = 'item';
            }
            imgs[i].onmouseleave = function() {
                for (let i = 0; i < links.length; i++) {

                    imgs[i].className = '';
                }
            }
        }
    }
}
export {
    Lj
}